<template>
<div>
  <div class="container">
    <div class="row clearfix">
      <div class="col-md-4 column">
      </div>
      <div class="col-md-4 column">
        <blockquote>
          <p>
           欢迎注册潍坊科技学院报修系统学生用户
          </p>
        </blockquote>
          <div class="form-group">
            <label for="exampleInputEmail1">学生姓名</label><input type="text" v-model="name" class="form-control" id="exampleInputEmail1" />
          </div>
          <div class="form-group">
            <label for="exampleInputEmail1">账号</label><input type="text" v-model="username" class="form-control"  />
          </div>
          <div class="form-group">
            <label for="exampleInputPassword1">密码</label><input type="password" v-model="password" class="form-control" id="exampleInputPassword1" />
          </div>
          <div class="form-group">
            <label for="exampleInputEmail1">学号</label><input type="text" v-model="studentId" class="form-control"  />
          </div>
          <div class="form-group">
            <label for="exampleInputEmail1">专业</label><input type="text" v-model="major" class="form-control"  />
          </div>
          <div class="form-group">
            <p class="help-block">

            </p>
          </div>
          <div class="checkbox">
          </div> <button type="submit" class="btn btn-default" v-on:click="login">注册</button>
      </div>
      <div class="col-md-4 column">
      </div>
    </div>
  </div>
  <div class="img1">

  </div>
  <div class="img2"></div>
</div>
</template>

<script>
export default {
  name: "StudentSignin",

  data(){
    return{
      "name":"",
      "username":"",
      "major":"",
      "password":"",
      "studentId":""
    }
  },
  methods:{
    login() {
      this.$ajax.post(base_url + "student/sign",{
        name : this.name,
        username : this.username,
        major : this.major,
        password : this.password,
        studentId : this.studentId

      }).then(
          (response) => {
                if (response.data.code == 200){
                  alert("注册成功")
                    this.$router.push("/")
                }else {
                  alert("已有该用户")

                }
          }
      )
    }
  }
}
</script>

<style scoped>

p{
	font-size: 20px;
	font-weight: bold;
	text-align: center;
}
.img1{
	position: absolute;
	overflow: hidden;
	background-image: url(img/7.jpg);
	left: 1000px;
	height: 750px;
	width: 533px;
	top: 0px;
	background-size: 100%;
	z-index: 1;
	border-radius: 50px;
  opacity: 0.6;
}
.img2{
	position: absolute;
	overflow: hidden;
	background-image: url(img/8.jpg);
	height: 750px;
	width: 533px;
	top: 0px;
	background-size: 100%;
	z-index: 1;
	border-radius: 50px;
  opacity: 0.6;
}
</style>